<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>将 GD 图像输出到浏览器或文件</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imagegd2.html">imagegd2</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imagegif.html">imagegif</a></div>
 <div class="up"><a href="ref.image.html">GD and Image 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.imagegd" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imagegd</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.7, PHP 5)</p><p class="refpurpose"><span class="refname">imagegd</span> &mdash; <span class="dc-title">将 GD 图像输出到浏览器或文件</span></p>

 </div>
 <div class="refsect1 unknown-seealsp" id="refsect1-function.imagegd-unknown-seealsp">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>imagegd</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$image</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code></span>
  ] )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>imagegd()</strong></span> 将一个 GD 图像输出到
   <em><code class="parameter">filename</code></em>。<em><code class="parameter">image</code></em>
   参数是由 <span class="function"><a href="function.imagecreatetruecolor.html" class="function">imagecreatetruecolor()</a></span> 函数返回的。
  </p>
  <p class="para">
   <em><code class="parameter">filename</code></em> 参数为可选项，如果为空，则原始图像流会被直接输出。
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    GD 格式一般是用来加载图像中的一部分时更快。注意
    GD 格式只能用于兼容于 GD 的应用程序。
   </p>
  </p></blockquote>
  <p class="para">
   参见 <span class="function"><a href="function.imagegd2.html" class="function">imagegd2()</a></span>。
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imagegd2.html">imagegd2</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imagegif.html">imagegif</a></div>
 <div class="up"><a href="ref.image.html">GD and Image 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
